import * as React from "react"
import { useStaticQuery, graphql } from "gatsby";

const query = graphql`
query {
    site {
      siteMetadata {
        title
      }
    }
  }
`

export default function Header() {
    //     const data = useStaticQuery(graphql`
    //     query HeaderQuery {
    //       site {
    //         siteMetadata {
    //           title
    //         }
    //       }
    //     }
    //   `)
    //     console.log('h:d', data)

    const data = useStaticQuery(graphql`
    query HeaderQuery {
      site {
        siteMetadata {
          title
        }
      }
    }
  `)
    return <header>header:{data}</header>
}